* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.game-area {
    margin-bottom: 30px;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

#guessInput {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 150px;
    text-align: center;
    transition: border-color 0.3s;
}

#guessInput:focus {
    outline: none;
    border-color: #667eea;
}

#submitBtn, #restartBtn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

#submitBtn {
    background: #667eea;
    color: white;
}

#submitBtn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
}

#submitBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#restartBtn {
    background: #48bb78;
    color: white;
    margin-top: 20px;
}

#restartBtn:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.message {
    font-size: 1.2em;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.message.hint {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.stats p {
    color: #4a5568;
    font-weight: 600;
}

.history {
    text-align: left;
    margin-top: 30px;
}

.history h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

#historyList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#historyList li {
    padding: 8px 12px;
    margin: 5px 0;
    background: #f7fafc;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#historyList li.too-high {
    border-left: 4px solid #fc8181;
}

#historyList li.too-low {
    border-left: 4px solid #63b3ed;
}

#historyList li.correct {
    border-left: 4px solid #68d391;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .input-section {
        flex-direction: column;
        align-items: center;
    }
    
    #guessInput {
        width: 100%;
        max-width: 200px;
    }
}
